#Boa:Dialog:Dialog1

import wx

def create(parent):
    return Dialog1(parent)

[wxID_DIALOG1, wxID_DIALOG1BUTTON1, wxID_DIALOG1BUTTON2, 
 wxID_DIALOG1CHECKBOX1, wxID_DIALOG1CHECKBOX2, wxID_DIALOG1CHECKBOX3, 
 wxID_DIALOG1CHECKBOX4, wxID_DIALOG1CHECKBOX5, wxID_DIALOG1CHECKBOX6, 
 wxID_DIALOG1CHECKBOX7, 
] = [wx.NewId() for _init_ctrls in range(10)]

class Dialog1(wx.Dialog):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', parent=prnt,
              pos=wx.Point(379, 128), size=wx.Size(181, 271),
              style=wx.DEFAULT_DIALOG_STYLE, title='Saska Exportacion')
        self.SetClientSize(wx.Size(173, 244))

        self.checkBox1 = wx.CheckBox(id=wxID_DIALOG1CHECKBOX1, label='Nombre',
              name='checkBox1', parent=self, pos=wx.Point(16, 24),
              size=wx.Size(70, 13), style=0)
        self.checkBox1.SetValue(False)

        self.checkBox2 = wx.CheckBox(id=wxID_DIALOG1CHECKBOX2, label='SKU',
              name='checkBox2', parent=self, pos=wx.Point(16, 48),
              size=wx.Size(70, 13), style=0)
        self.checkBox2.SetValue(True)

        self.checkBox3 = wx.CheckBox(id=wxID_DIALOG1CHECKBOX3,
              label='Descripcion+Agregado', name='checkBox3', parent=self,
              pos=wx.Point(16, 72), size=wx.Size(144, 13), style=0)
        self.checkBox3.SetValue(False)

        self.checkBox4 = wx.CheckBox(id=wxID_DIALOG1CHECKBOX4, label='Precio',
              name='checkBox4', parent=self, pos=wx.Point(16, 96),
              size=wx.Size(70, 13), style=0)
        self.checkBox4.SetValue(False)

        self.checkBox5 = wx.CheckBox(id=wxID_DIALOG1CHECKBOX5, label='Cantidad',
              name='checkBox5', parent=self, pos=wx.Point(16, 144),
              size=wx.Size(70, 13), style=0)
        self.checkBox5.SetValue(True)

        self.checkBox6 = wx.CheckBox(id=wxID_DIALOG1CHECKBOX6,
              label='Habilitado', name='checkBox6', parent=self,
              pos=wx.Point(16, 168), size=wx.Size(70, 13), style=0)
        self.checkBox6.SetValue(True)

        self.button1 = wx.Button(id=wxID_DIALOG1BUTTON1, label='Procesar',
              name='button1', parent=self, pos=wx.Point(16, 216),
              size=wx.Size(56, 23), style=0)
        self.button1.Bind(wx.EVT_BUTTON, self.OnProcesar,
              id=wxID_DIALOG1BUTTON1)

        self.button2 = wx.Button(id=wxID_DIALOG1BUTTON2, label='Salir',
              name='button2', parent=self, pos=wx.Point(96, 216),
              size=wx.Size(59, 23), style=0)
        self.button2.Bind(wx.EVT_BUTTON, self.OnSalir, id=wxID_DIALOG1BUTTON2)

        self.checkBox7 = wx.CheckBox(id=wxID_DIALOG1CHECKBOX7,
              label='Precio recomendado', name='checkBox7', parent=self,
              pos=wx.Point(16, 120), size=wx.Size(144, 13), style=0)
        self.checkBox7.SetValue(False)

    def __init__(self, parent):
        self._init_ctrls(parent)
        self.procesa = False
        self.columnas = []
        self.titulos = []

    def OnSalir(self, event):
        self.Close()

    def OnProcesar(self, event):
        self.procesa = True
        columnas = []
        titulos = []
        if self.checkBox1.GetValue(): #nombre
            columnas.append(0)
            titulos.append(0)
        if self.checkBox2.GetValue(): #sku
            columnas.append(1)
            titulos.append(1)
        if self.checkBox3.GetValue(): #descripcion+agregado
            columnas.append(2)
            titulos.append(2)
        if self.checkBox4.GetValue(): #precio
            columnas.append(4)
            titulos.append(3)
        if self.checkBox7.GetValue(): #precio recomendado
            columnas.append(5)
            titulos.append(4)
        if self.checkBox5.GetValue(): #cantidad
            columnas.append(6)
            titulos.append(5)
        if self.checkBox6.GetValue(): #habilitado
            columnas.append(7)
            titulos.append(6)
        self.columnas = columnas
        self.titulos = titulos
        self.Close()

    def getExportacion(self):
        return self.procesa,self.columnas,self.titulos
    
